package com.hmall.item.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hmall.common.dto.PageDTO;
import com.hmall.item.pojo.Item;
import com.hmall.item.pojo.RequestParams;

import java.util.List;
import java.util.Map;

public interface IItemService extends IService<Item> {

    PageDTO<Item> findByPage(Long page, Long size);

    Item findById(Integer id);

    void saveItem(Item item);

    void updateItemStatus(Integer id, Integer status);

    void updataItem(Item item);

    void deleteItem(Integer id);

    Map<String, List<String>> getFilterOptions(RequestParams requestParams);

    PageDTO<Item> searchItems(RequestParams requestParams);

    void deStock(Long itemId, Integer num);

    List<Item> selectTopSalesItems(int i);
}
